#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Rev(i,a,b) for(int i=a;i>=b;i--)
#define Fin(file) freopen(file,"r",stdin);
#define Fout(file) freopen(file,"w",stdout);
using namespace std;
const int N=1e6+5; using ll = long long;
char mp[105][105]={
	"                               ",
	" .GB..BG..GB..BG..GB..BG..GB..B",
	" BRRGGRRBBRRGGRRBBRRGGRRBBRRGGR",
	" GRRBBRRGGRRBBRRGGRRBBRRGGRRBBR",
	" .BG..GB..BG..GB..BG..GB..BG..G",
	" .BG..GB..BG..GB..BG..GB..BG..G",
	" GRRBBRRGGRRBBRRGGRRBBRRGGRRBBR",
	" BRRGGRRBBRRGGRRBBRRGGRRBBRRGGR",
	" .GB..BG..GB..BG..GB..BG..GB..B",
	" .GB..BG..GB..BG..GB..BG..GB..B",
	" BRRGGRRBBRRGGRRBBRRGGRRBBRRGGR",
	" GRRBBRRGGRRBBRRGGRRBBRRGGRRBBR",
	" .BG..GB..BG..GB..BG..GB..BG..G",
	" .BG..GB..BG..GB..BG..GB..BG..G",
	" GRRBBRRGGRRBBRRGGRRBBRRGGRRBBR",
	" BRRGGRRBBRRGGRRBBRRGGRRBBRRGGR",
	" .GB..BG..GB..BG..GB..BG..GB..B",
	" .GB..BG..GB..BG..GB..BG..GB..B",
	" BRRGGRRBBRRGGRRBBRRGGRRBBRRGGR",
	" GRRBBRRGGRRBBRRGGRRBBRRGGRRBBR",
	" .BG..GB..BG..GB..BG..GB..BG..G",
	" .BG..GB..BG..GB..BG..GB..BG..G",
	" GRRBBRRGGRRBBRRGGRRBBRRGGRRBBR",
	" BRRGGRRBBRRGGRRBBRRGGRRBBRRGGR",
	" .GB..BG..GB..BG..GB..BG..GB..B",
	" .GB..BG..GB..BG..GB..BG..GB..B",
	" BRRGGRRBBRRGGRRBBRRGGRRBBRRGGR",
	" GRRBBRRGGRRBBRRGGRRBBRRGGRRBBR",
	" .BG..GB..BG..GB..BG..GB..BG..G",
	" .BG..GB..BG..GB..BG..GB..BG..G",
	" GRRBBRRGGRRBBRRGGRRBBRRGGRRBBR",
};
char ss[N],ans[N]; int n,S=100;
mt19937 rng(190345);
int main(){
	Fin("snake.in");
	Fout("snake.out");
	cin>>(ss+1); n=strlen(ss+1);
	For(i,1,30) For(j,1,30) if(mp[i][j]=='.') mp[i][j]='R';
	For(i,1,S) For(j,1,S){
		if(i>30) mp[i][j]=mp[i-8][j];
		else if(j>30) mp[i][j]=mp[i][j-8];
	}
	int Sx=0,Sy=0,Try=0;
	while(true){
		//~ cerr<<"Try #"<<++Try<<'\n';
		int x=0,y=0;
		For(i,S/2-1,S/2+1) For(j,S/2-1,S/2+1) if(mp[i][j]==ss[1]) { x=i,y=j; break; }
		assert(mp[x][y]==ss[1]);
		Sx=x; Sy=y;
		int Done=1;
		For(i,2,n){
			//~ cerr<<x<<' '<<y<<'\n';
			const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};
			const char cmd[]="RDLU";
			int O[4]={0,1,2,3},ok=0; shuffle(O,O+4,rng);
			For(j,0,3){
				int o=O[j],tx=x+dx[o],ty=y+dy[o];
				if(tx>=1&&tx<=S&&ty>=1&&ty<=S&&mp[tx][ty]==ss[i]){
					x=tx; y=ty; ans[i-1]=cmd[o]; ok=1; break;
				}
			}
			if(!ok) { Done=0; break; }
		}
		if(Done) break;
	}
	cout<<S<<' '<<S<<'\n';
	For(i,1,S){
		For(j,1,S){
			cout<<(mp[i][j]=='.'?'R':mp[i][j]);
		}
		cout<<'\n';
	}
	cout<<Sx<<' '<<Sy<<'\n';
	cout<<ans+1<<'\n';
	return 0;
}
